package com.carrydream.ksad;

import android.os.Bundle;
import android.widget.FrameLayout;

import androidx.appcompat.app.AppCompatActivity;

import com.xmad.ksadutils.AdSDK.AdBase.AdBuilder;
import com.xmad.ksadutils.AdSDK.AdBase.AdListener;
import com.xmad.ksadutils.AdSDK.AdMold.Kwai.KsFullScreenAd;
import com.xmad.ksadutils.AdSDK.AdMold.Kwai.KsLoadSplashScreenAd2;
import com.xmad.ksadutils.AdSDK.AdMold.Kwai.KsNewRewardVideoAd;
import com.xmad.ksadutils.AdSDK.AdMold.Pangolin.PGloadFullScreenVideoAd2;
import com.xmad.ksadutils.AdSDK.AdTool;
import com.xmad.ksadutils.AdSDK.AdUtil;
import com.xmad.ksadutils.AdSDK.Utlis.Tool;


public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        FrameLayout bg=(FrameLayout)findViewById(R.id.bg);
        AdTool.getInstance().get(this)
                .setAdLoad(KsLoadSplashScreenAd2.getInstance())
                .setListener(new AdListener(){
                    @Override
                    public void onJump(int type) {
                        AdTool.getInstance().get(MainActivity.this)
                                .setAdLoad(PGloadFullScreenVideoAd2.getInstance().setListener(new AdListener(){
                                    @Override
                                    public void onJump(int type) {
                                        super.onJump(type);
                                        finish();
                                    }

                                   @Override
                                    public void onError(String error) {
                                        super.onError(error);
                                    }

                                    @Override
                                    public void close() {
                                        super.close();
                                        finish();
                                    }
                                }))
                                .setPGid(true,"948299389");
                    }
                })
                .setFrameLayout(bg)
                .setKSid(true, 9162000063L,9162000064L);
    }
}